package com.ihteima.pojo;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;

/**
 * ClassName: Article
 * Package: com.ihteima.pojo
 * Description:
 *
 * @Auther gongkaiming
 * @Create 2025/10/26 18:50
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Article {

    private Integer id;//主键ID
    
    private String title;//文章标题
    @NotEmpty
    private String content;//文章内容
    @NotEmpty
    @URL
    private String coverImg;//封面图像

    private String state;//发布状态 已发布|草稿
    
    private Integer categoryId;//文章分类id
    
    private Integer createUser;//创建人ID
    
    private LocalDateTime createTime;//创建时间
    
    private LocalDateTime updateTime;//更新时间
}
